package com.zy.tree;

/**
 * @author zhaoyi
 * @date 2021/9/15 16:46
 * https://leetcode-cn.com/leetbook/read/top-interview-questions-easy/xn7ihv/
 */
public class TreeNode {

    int val;
    TreeNode left;
    TreeNode right;

    TreeNode() {
    }

    TreeNode(int val) {
        this.val = val;
    }

    TreeNode(int val, TreeNode left, TreeNode right) {
        this.val = val;
        this.left = left;
        this.right = right;
    }

    @Override
    public String toString() {
        return "value is "+ val;
    }
}
